package com.hdax.dmw.item.api;

import com.hdax.dmw.dtos.item.IndexNavDto;
import com.hdax.dmw.item.service.IndexNavService;
import com.hdax.dmw.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(path = "/index")
public class IndexNavApi {

    @Autowired
    private IndexNavService indexNavService;

    @PostMapping(path = "/nav")
    public Result<List<IndexNavDto>> indexNav(){
        return indexNavService.indexNavList();
    }

}
